<%--
  Created by IntelliJ IDEA.
  User: hasee
  Date: 2018/4/19
  Time: 11:03
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<body>

    <%

        String username = request.getParameter("username");
        String password = request.getParameter("password");

        if ("admin".equals(username) &&
                "123456".equals(password)) {
            //管理员可以登录
            out.write("<h1>登陆成功!</h1>");

            session.setAttribute("isLogin","true");
            out.write("<br/><button><a href='userList.jsp'>跳转到用户界面</a></button>");


        }else {
            out.write("<p>用户名或密码错误。</p>");



        }

    %>

</body>
</html>
